import pandas as pd
import plotly.express as px
newcsv = input("Enter the filename: ")
newcsv = "https://filella.github.io/" + newcsv
print(newcsv)
# Create pandas DataFrame from a CSV and concatenate a second DataFrame
# df = pd.read_csv('C:/Users/Pep/Documents/Figura2.csv')
# df1 = pd.read_csv('C:/Users/Pep/Documents/Figura3.csv')
df = pd.read_csv('https://filella.github.io/Figura2.csv')
df1 = pd.read_csv(newcsv)
df = pd.concat([df, df1], ignore_index=True)
# Make legend discrete
df['Series'] = df['Series'].astype(str)
print(df)
# Plot the data
fig = px.scatter(df, x='Date', y='Antimony', color='Series',
title='Test scatter plot',
labels=dict(Date='Year of publication',
Antimony='Antimony / ng L<sup>-1</sup>', Series='Series number')
)
fig.update_traces(marker=dict(size=12,
line=dict(width=0)),
selector=dict(mode='markers'))
fig.update_yaxes(range=[0, 1000],
minor_ticks="inside", tickcolor='black',
ticks="inside", ticklen=8, minor_ticklen=5,
showline=True, linewidth=1, linecolor='black', mirror=True,
showgrid=True, gridwidth=1, gridcolor='grey')
fig.update_xaxes(showline=True, linewidth=1, linecolor='black', mirror=True,
showgrid=True, gridwidth=1, gridcolor='grey',
minor_ticks="inside", minor_ticklen=5, minor_dtick=1) # nticks=15
# Create plot
fig.show()